创建数组时出现自动化错误 | 您所在的位置:网站首页 › 自动化automation错误发生意外 vba › 创建数组时出现自动化错误 |
百度翻译此文
有道翻译此文
问题描述
I have a macro that's working on one computer just fine, however when I try to run it on another computer I get the following error: Run-time error '-2146232576 (80131700)' Automation error Here's the code: Sub Kaivuri() Dim i As Long Dim arvoKohta As Integer Dim etuKohta As Integer Dim sukuKohta As Integer Dim yritysKohta As Integer Dim tulosMaara As Integer Dim ws As Worksheet Dim hakuSana As String Dim arvo As String Dim etunimiLista As Object Dim sukunimiLista As Object Dim riviLista As Object Dim kaupunkiLista As Object Dim lisarivit As Integer Set kaupunkiLista = CreateObject("System.Collections.ArrayList") Set riviLista = CreateObject("System.Collections.ArrayList") Set etunimiLista = CreateObject("System.Collections.ArrayList") Set sukunimiLista = CreateObject("System.Collections.ArrayList") Set browserIE = CreateObject("InternetExplorer.Application") browserIE.Top = 0 browserIE.Left = 800 browserIE.Width = 800 browserIE.Height = 1200 browserIE.Visible = True Set ws = ThisWorkbook.Worksheets("etsintä") i = 174958 etuKohta = 1 sukuKohta = 2 yritysKohta = 5 arvoKohta = 20 browserIE.navigate ("https://www.linkedin.com/sales/search? facet=G&count=25&start=0&updateHistory=true&searchHistoryId=4444924553") Do While browserIE.ReadyState 4 And browserIE.Busy: DoEvents: Loop Application.Wait (Now + TimeValue("0:00:5")) browserIE.document.getelementsbyclassname("facet G") (0).getelementsbyclassname("plus-icon-container")(0).getelementsbyclassname("small-icon")(0).Click browserIE.document.getelementbyid("G-input").Value = "Finland" 'Application.SendKeys ("~ (tilde)") 'Application.Wait (Now + TimeValue("0:00:1")) r = 0 Do While i |
CopyRight 2018-2019 实验室设备网 版权所有 |